package com.wushi.lenovo.asia5b.app_push;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;

import static java.lang.System.out;

/**
 * Created by zhangyuncai on 2020/1/7.
 * 自定义通知栏需要
 */
public class PushBroadCast extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        out.println("---<<<>>>---action:" + intent.getAction());
        if (MyFirebaseMessagingService.bean != null) {
            if (TextUtils.equals(intent.getAction(), "small")) {
                MyFirebaseMessagingService.sendSmallAndBigNotification(MyFirebaseMessagingService.bean, "small", MyFirebaseMessagingService.smallBitmap, MyFirebaseMessagingService.bigBitmap);
            }
            if (TextUtils.equals(intent.getAction(), "big")) {
                MyFirebaseMessagingService.sendSmallAndBigNotification(MyFirebaseMessagingService.bean, "big", MyFirebaseMessagingService.smallBitmap, MyFirebaseMessagingService.bigBitmap);
            }
        }
    }
}
